#! /bin/bash

# Remove extraneous wireplumber configuration made by quirks that
# interferes with first boot
post_install() {
  local MOUNT_PATH=$1

  if [ -d "${MOUNT_PATH}/etc/wireplumber" ]; then
    # We have a wireplumber setup should delete it,
    # device quirks would recreate it anyways

    mv -f -b "${MOUNT_PATH}/etc/wireplumber" "${MOUNT_PATH}/etc/wireplumber.bak"
    echo "Wireplumber setup is reset and backed up as /etc/wireplumber.old"
  fi
}
